import axios from "@/utils/request";

export function addAdministrator(params){
    return axios({
        method:"post",
        url:"/administrator",
        data:params
    })
}

export function deleteAdministrator(params){
    return axios({
        method:"delete",
        url:"/administrator",
        data:params
    })
}

export function updateAdministrator(params){
    return axios({
        method:"put",
        url:"/administrator",
        data:params
    })
}

export function selectAdministrator(params){
    return axios({
        method:"get",
        url:"/administrator",
        params: {
            pageNum:params.pageNum,
            pageSize:params.pageSize,
            search:params.search,
        }
    })
}

export function loginAdministrator(params){
    return axios({
        method:"post",
        url:"/administrator/login",
        data: params
    })
}